Computer software can be developed using an authoring tool. The authoring tool provides an environment including a text editor that allows the author to draft and edit the source code for the computer software. Some conventional authoring tools for developing computer software are provided with debugging tools that allow an author of the computer software to execute and debug the computer software from the development environment, allowing the author to rapidly switch between authoring of the computer software and debugging of the computer software.
Conventional debugging tools for compiled computer software allow the author to execute the computer software being debugged in a manner that is identical to the execution of the software in a runtime environment. Because the authoring tool compiles the computer software, and because the debugger is supplied by the same company that supplies the compiler, it is possible for the debugger to accurately simulate the operation of the computer software in the runtime environment and execute the computer software in exactly the same way. If the computer software is interpreted, the accurate simulation is also possible if the supplier of the debugger is the same party that supplies the interpreter.
If, however, the debugger is not supplied by the same party as the party supplying the interpreter or compiler, the accurate simulation or reproduction of execution or interpretation of the computer software may not be possible by the debugger if the supplier of the interpreter or compiler refuses to disclose their specifications or if such specifications are not available, or incomplete or would be inaccurate. If multiple third-party interpreters or compilers are available to interpret or compile the same source code, the accurate simulation of execution or interpretation by all of the available compilers or interpreters can be more difficult to achieve if each such interpreter or compiler operates differently or has the potential to operate differently.
In such a circumstance, the author wouldn't fully trust the debugging tool to accurately simulate the execution or interpretation, requiring the author to first debug the computer software using the debugging tool, then test the computer software in a runtime environment. If the debugger had not accurately simulated the execution of the computer software, the author is left stranded without a way to debug the computer software in a manner that precisely simulates its execution. The problem is compounded when multiple sources supply compilers or interpreters, each as part of an ever changing product, making it difficult or impossible for the supplier of the debugging tool to incorporate each and every change made by each compiler or interpreter.
The worst case scenario is currently applicable to JAVASCRIPT computer software written for interpretation by any of a number of browsers. Many authoring tools used to author JAVASCRIPT code to be executed when a web page is displayed are provided by suppliers who are different from the suppliers of the browsers. Each browser may have its own varying interpretation techniques, and the interpretation techniques are not completely published by the browser manufacturers. These factors make it difficult or impossible for the suppliers of the various authoring tools to provide debugging tools that can accurately reproduce how each browser will interpret the JAVASCRIPT computer programs supplied with web pages to those browsers. This makes it hard for an author to trust the debugging tool and provides the potential for an author to be stuck without the means to effectively debug a JAVASCRIPT program.
In addition to all of these problems with accurate simulation of the runtime environment, some debugging techniques are not very stable. For example, attempting to discern the value of an expression that cannot be evaluated can cause an error that can crash the computer system on which the computer program is being debugged, making the debugging process more time consuming and cumbersome.
What is needed is a system and method that can provide a debugging tool that accurately reproduces the operation of a compiler or interpreter without requiring the supplier of the debugging tool to have access to accurate specifications of the compiler or debugger and can provide such accurate debugging for a variety of compilers or interpreters but without crashing the computer system on which the debugging tool is operating if an author makes a request via the debugging tool that would otherwise crash the executing program.